<table class="table table-togglable table-hover" style="word-break: keep-all;">
    <thead>
    <tr>
        <th data-toggle="true">编号</th>
        <th>头像</th>
        <th data-hide="phone">名称</th>
        <th data-hide="">邮箱</th>
        <th data-hide="phone,tablet">手机号</th>
        <th data-hide="phone">操作</th>
    </tr>
    </thead>
    <tbody>
    <?spa foreach(it.list as key => item): ?>
    <tr>
        <td>{{= item.id }}</td>
        <td> <img src="{{= item.avatar }}" width="60" height="60"></td>
        <td><a>{{= item.name }}</a></td>
        <td>{{= item.email }}</td>
        <td>{{= item.mobile }}</td>
        <td>
            <button type="button" class="btn btn-default btn-xs" onclick='editMember("{{= item.id }}")'><i class="icon-hat position-left"></i>编辑</button>
            <button type="button" class="btn btn-default btn-xs" onclick='deleteMember("{{= item.id }}")'><i class="icon-cross2 position-left"></i>删除</button>
        </td>
    </tr>
    <?spa endForeach; ?>

    </tbody>
</table>
<script>
    var editMember = function (id) {
        Alpaca.to("#/main/admin/memberEditView/" + id, {id: id});
    };

    var deleteMember = function (id) {
        Alpaca.to("#/main/admin/memberDelete/" + id, {id: id});
    };
</script>